// store.js (Vue 2)
import Vue from 'vue'
import Vuex from 'vuex'
//导入购物车store模块
import m_cart from "@/store/cart.js"
import m_user from '@/store/user.js'
// 注册 Vuex 插件
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  modules: {
    //以后访问cart.js里面的属性都要通过  m_cart  这个对象来访问
    'm_cart': m_cart,
    'm_user': m_user
  }
})

export default store